const db = require('./index');
const Schema = db.Schema;
const OperationLogSchem = new Schema(
    {
        id: { type: String },//操作者id
        name: { type: String },//操作者姓名
        roles: { type: String },//角色
        Operationcontent: { type: String, default: null },//操作内容
        ip: { type: String, default: null },//操作者ip，
        time: { type: String, default: null }//操作时间
    }
);
OperationLogSchem.index({ name: "text", Operationcontent: "text", roles: "text",time:"text" })
const OperationLog = db.model('OperationLog', OperationLogSchem);

module.exports = OperationLog;